package com.huarui.task.status.impl;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import com.huarui.task.status.StatusTree;
import com.huarui.task.status.StatusTreeService;

public class StatusTreeServiceImpl implements StatusTreeService {

	
	public void init(){
		
	}
	
	private Map<String , StatusTree> statusTrees = new HashMap<String, StatusTree>(); 
	
	@Override
	public Collection<String> getChildren(String type, String status) {
		
		return statusTrees.containsKey(type) ?  statusTrees.get(type).getChildren(status) : null; 
		
		
	}

	@Override
	public Collection<String> getParent(String type, String status) {

		return statusTrees.containsKey(type) ?  statusTrees.get(type).getParents(status) : null; 
	}

}
